package flatlandRPGTest;

import flatlandRPG.GLColoredPolygon;
import flatlandRPG.GLPrimitive;

// -------------------------------------------------------------------------
/**
 * Tests the GLColoredPolygon class.
 *
 * @author evant
 * @version May 1, 2011
 */
public class GLColordPolygonTest
    extends GLPolygonTest
{
    private GLColoredPolygon testPolygon;


    /**
     * Sets up the test case. This is called before each test method.
     */
    public void setUp()
    {
        super.setUp();
        testPolygon = (GLColoredPolygon)getPrimitive();
    }


    @Override
    public GLPrimitive getPrimitive()
    {
        return new GLColoredPolygon(255f, 150f, 0f, 0f, 0f, 0f, 1f, 1f, 1f);
    }


    public void testColor()
    {
        assertEquals(255, testPolygon.getColor().getRed());
        assertEquals(150, testPolygon.getColor().getGreen());
        assertEquals(0, testPolygon.getColor().getBlue());
    }
}
